package com.zh.ssmshirofreemarker.websocket;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.Date;

public class Msg {

    private int type;   //消息类型： 0.系统消息  1.业务消息  2.

    private Object data;   //具体的内容

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date date;                        //消息发送的时间

                            //
    public Msg(int type, Object data, Date date) {
        this.type = type;
        this.data = data;
        this.date = date;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }
}
